import java.util.Scanner;

public class Practice2 {
    public static void main(String[] args) {
        //https://ac.nowcoder.com/acm/problem/205350
        //注意溢出问题即可
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long mid = (long)Math.sqrt(n);
        long num1 = (mid + 1) * (mid + 1);
        long num2 = mid * mid;
        if(Math.abs(num1 - n) > Math.abs(num2 - n)){
            System.out.println(num2);
        }else{
            System.out.println(num1);
        }
    }
}
